package com.drink.yan.intf.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.meta.framework.copy.Copyable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.util.List;

/**
 * java类简单作用描述
 *
 * @Title:
 * @Package: com.drink.yan.intf.entity.
 * @Author: M.simple
 * @Remark: The modified content
 * @CreateDate: 2023/11/24 17:13
 * @Version: v2.0
 */
@Data
@TableName(value = "yan_activity", autoResultMap = true)
public class YanActivity extends Copyable {

    @TableId(value = "activity_id", type = IdType.AUTO)
    @ApiModelProperty(value = "活动编号")
    private Long activityId;

    @ApiModelProperty(value = "活动名称")
    private String activityName;

    @ApiModelProperty(value = "活动类型：线下讲座（offline_lecture），线下体验（offline_experience）")
    private String activityType;

    @TableField(value = "activity_images", typeHandler = FastjsonTypeHandler.class)
    @ApiModelProperty(value = "活动图片")
    private List<String> activityImages;

    @TableField(value = "activity_labels", typeHandler = FastjsonTypeHandler.class)
    @ApiModelProperty(value = "活动图片")
    private List<String> activityLabels;

    @ApiModelProperty(value = "活动内容")
    private String activityContent;

    @ApiModelProperty("作用域类型：all,school_area,agency")
    private String scopeType;

    @TableField(value = "scope_value", typeHandler = FastjsonTypeHandler.class)
    private List<Long> scopeValue;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @ApiModelProperty(value = "起始时间")
    private LocalDateTime startTime;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @ApiModelProperty(value = "结束时间")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "活动地址")
    private String activityAdress;

    @ApiModelProperty(value = "状态")
    private String activityStatus;

    @ApiModelProperty(value = "人数限制")
    private Long userLimit;
    private Long tenantId;
    private String delFlag;
    private Long createBy;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime createTime;
    private Long updateBy;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime updateTime;
    private String remark;
}
